package day02;

public class test {
    public static void main(String[] args) {
        //算术计算符
        int a = 1,b=2,c=3;
        System.out.println(b/a);//2
        System.out.println(b%a);//0
        System.out.println(c++);//3
        System.out.println(c++);//4
        int d = ++c + --a;//(5+1)+(1-1)=6
        System.out.println(d);//6
        System.out.println(c);//6
        System.out.println(a%c);//0
        //关系计算符
        boolean a1 = (a+c>=3*b);//6>=6 ,true
        boolean a2 = (c-3*b !=a);//6-2*3=0=a, false
        System.out.println(a1);
        System.out.println(a2);
        //逻辑计算符 与或非
        boolean b1 = (a>b && a>c);
        boolean b2 = (c>a || c>b);
        boolean b3 = !(a+b>=c);
        System.out.println(b1);//false
        System.out.println(b2);//true
        System.out.println(b3);//true
        //赋值运算符：= += *= /= -= %=
        int c1= 5,c2=10,c3=20;
        c1 *=2;//10
        c2 +=c1;//20
        System.out.println(c3%=c2);//0
        //字符串连接 +
        String holiday = "中国春节";
        System.out.println("在中国，最隆重的节日就是"+holiday);
        int height = 10;
        System.out.println("这条巨蟒长达"+height+"米！");
        int month = 2;
        int day = 14;
        System.out.println("今天是"+month+day+"情人节");
        //条件运算符： boolean?数1：数2
        int aa = 99;
        int bb = 999;
        int max = (aa>bb)?aa:bb;
        System.out.println(max);
        //if结构
        int cc = 100;
        if(cc%5==0){
            System.out.println("cc是5的倍数");
        }
        //if... else结构
        int dd = 37;
        if (dd%2==0) {
            System.out.println("dd是偶数");
        }else{
            System.out.println("dd是奇数");
        }
        //if...else if结构
        int wage = 100000;
        if (wage>=1000000) {
            System.out.println("高收入群体");
        }else if (wage>=100000){
            System.out.println("中等收入群体");
        }else if (wage>=20000) {
            System.out.println("低收入群体");
        }else{
            System.out.println("低保户");
        }














    }
}
